import java.util.Scanner;

public class Test8
{
    public static void main(String[] args) {
        int x=(int)(Math.random()*10)+1;
   System.out.print("随机数以产生！请猜数字吧：");
        Scanner  sc=new Scanner(System.in);
        int num=sc.nextInt();
        while (x!=num){
            if(num>x){
               System.out.println("猜大了");

            }else{
                System.out.println("猜小了");
            }
            System.out.println("继续猜吧:");
            num=sc.nextInt();

        }
System.out.println("恭喜您，猜对了!");

    }
}
